<head th:fragment="headerCss">
    <meta charset="utf-8">
    <title>湖南金职伟业母婴护理有限公司</title>
    <meta content="width=device-width, initial-scale=1.0" name="viewport">
    <meta name="keywords" content=""/>
    <meta name="description"
          content="湖南金职伟业母婴护理有限公司"/>
    <link rel="stylesheet" href="/js/layui/css/layui.css">
    <!-- Bootstrap CSS File -->
    <!--<link href="/lib/bootstrap/css/bootstrap.min.css" rel="stylesheet">-->
    <link rel="stylesheet" href="/css/certificateQuery/common.css">
    <link href="/css/font-awesome.css?v=4.4.0"
          th:href="@{/css/font-awesome.css?v=4.4.0}" rel="stylesheet">
    <!-- Google Fonts -->
    <link rel="shortcut icon" href="favicon.ico">
    <style>
        .ti1{float: left;width: 20%;line-height: 42px;color: #666}
        .ti2{float: left;width: 80%}
        .t1{
            background:url(/img/certificateQuery/t1.png) no-repeat left;
            background-size: 24px;
            background-color: #fff;
            background-position: 16px;
            padding-left:56px;

        }
        .t2{
            background:url(/img/certificateQuery/t2.png) no-repeat left;
            background-size: 24px;
            background-color: #fff;
            background-position: 16px;
            padding-left:56px;
        }
        .t3{
            background:url(/img/certificateQuery/t3.png) no-repeat left;
            background-size: 24px;
            background-color: #fff;
            background-position: 16px;
            padding-left:56px;
        }
    </style>
</head>
<body class="signin">
<div class="main_content has_back">
    <div class="window_box" style="position: absolute;right: 13%">
        <div class="loginIn">
            <div class="item">
                <input  type="text" id="certificateNumber" placeholder="证书编号" autocomplete="new-password" class="t1 layui-input" >
                <div style="clear: both"></div>
            </div>
             <div class="item">
                <input type="text" id="idNumber" placeholder="证件号码" autocomplete="new-password"
                       class="layui-input t2">
                <div style="clear: both"></div>
            </div>
            <div class="item">
                <input type="text" id="name" placeholder="姓    名" autocomplete="new-password" class="layui-input t3">
                <div style="clear: both"></div>
            </div>
            <!--<div class="item" style="text-align: right">-->
                <!--<label ><a href="/examination/abnormal">考试异常恢复</a></label>-->
            <!--</div>-->
            <div class="item">
                <input type="hidden" th:value="${time}" id="times" />
                <input type="hidden" th:value="${dates}" id="dates" />
                <a href="javascript:;" class="layui-btn layui-btn-fluid btn" onclick="query()"
                   id="submitBtn">查 询</a>
            </div>
            <div class="ps">
                <p>注意：</p>
                <p>1.以上三项输入任何两项即可查询。</p>
                <p>2.查询证书需经权属人同意。</p>
                <p>3.证书查询结果不得用于违背权属人意愿之用途。</p>
                <p>4.欢迎您提供宝贵建议：400-8718-776</p>

            </div>
        </div>
    </div>
</div>
<script src="/js/jquery.min.js?v=2.1.4" th:src="@{/js/jquery.min.js?v=2.1.4}"></script>
<script src="/js/plugins/layer/layer.min.js" th:src="@{/js/plugins/layer/layer.min.js}"></script>
<script type="text/javascript">
    //回车查询
    var examinationListIntro = null;
    document.onkeydown =cdk;
    function cdk(){
        if(event.keyCode ==13){
            query();
        }
    }
    var id=null;
    $(function () {
    });
    function query() {
        var certificateNumber = $("#certificateNumber").val();
        var idNumber = $("#idNumber").val();
        var name = $("#name").val();
        $.ajax({
            type: "GET",
            url:"/jzApi/ApiTrainCertificateController/getUserCertificate",
            data: {certificateNumber:certificateNumber,name:name , idNumber:idNumber},
            success: function (r) {
                console.log("map =" , r.data[0]);

                if(r.code==0){
                    var result = r.data[0];
                    location.href = '/certificate/queryResult?certificateNumber='+result.certificateNumber+
                        "&courseTitle="+result.courseTitle+"&getTime="+result.getTime+"&grade="+result.grade+
                        "&idNumber="+result.idNumber+"&img="+result.img+"&name="+result.name+"&period="+result.period+
                        "&sex="+result.sex+"&type="+result.type+"&unit="+result.unit;
                }else{
                    alert(r.msg);
                }
            }
        });
    }
</script>
</body>





